When a text box can only enter a number is a very common demand, such as phone number, ID number, card number, number .... And so on only allow digital input, in order to better user experience, directly write the need to start the numeric keypad, I and most people use this.style.imemode= ' disabled ';
There are four forms of IMEMode, respectively:
Active represents i
When I look at the English word corresponding to the phone number of "beautiful programming", I think that sometimes I receive digital text messages such as "43" when I think of college ", in fact, Translation into Chinese characters means "Haha", but you have to rely on your brain for analysis, so I spent some time writing a small program, after converting "43" to "he", the code from "he" to "ha" has not been written yet, I think the subsequent progr
When the text box can only enter numbers is a very common need, such as phone number, ID number, card number, number .... And so on only digital input, in order to better user experience, directly write the need to start the digital keyboard, I like most people withThis. style.imemode=' Disabled ';There are four forms of imemode, namely:Active representative IME
Implementing input input boxes can only enter the effect of numbers: input type = "text" name = "" ID = "Phonenum" = "" class = "Mui-input" placeholder = "Please enter your 11-digit phone number" Oninput = ' This.value=this.value.replace (/\d/gi, "") ' maxlength = "one" /> //When
parallel port output for various automatic control.
1. Introduction to PC parallel ports
Currently, parallel interfaces in computers are mainly used as printer ports. interfaces are not 36-pin connectors but 25-pin D-connectors. The so-called "Parallel" means that 8-bit data is transmitted through parallel lines at the same time, which greatly improves the data transmission speed.
Currently, there are five common parallel ports: SPP, PS/2, EPP, ECP, and multi-mode interfaces. Most PCs are equip
1. Virtual keypad to fill in the form more quickly
When it comes to some frequent data entry, the financial staff are more accustomed to using the numeric keypad on the keyboard. If you use a simple keyboard operation without a keypad, a row of data keys can be awkward to operate. If the virtual a digital keypad on the screen, click Input data with the mouse, you can make the form data entry more convenien
JS control text box can only enter numbers
JS control text box can only enter numbers, decimal points
JS control text box can only be entered in English
JS control text box can only be entered in English, digital
JS control text box can only input Chinese
JS control text box can only input Chin
1. Background of the problemEncounter a problem: there is an input box that requires only Chinese, numeric, and English (that is, filter special strings)2. JS Codefunction Checkusername (){Regular expressionsvar reg = new RegExp ("^[a-za-z\d\u4e00-\u9fa5]+$");Get the value in the input boxvar username = document.getElementById ("username"). Value.trim ();Determine what is in the
//can be used, this program is to convert text into the in-machine code. In-Machine code = GB Code +8080h, but study. //This program is the use of Chinese characters in the machine output is the principle of in-machine code, directly saved, in fact, quite simple. //input A string of Chinese characters and numbers of the mixed character, after the program conversion, corresponding output a string of 16 code (dig
feature is the story of a real input box and 6 fake input boxes.
The real input box and the fake input frame container are positioned overlapping, pay attention to the real input box priority set higher, or you can not input.
I
The name input screen in the game is a scene with very little Chinese characteristics.
We know that there are only 26 English letters and only several hundred Kana in Japanese, but there are too many Chinese characters, as a result, only some Chinese characters can be used to fill the Kana name when the name input image is translated into Chinese.
The input name
As the original text has been introduced very well, now is only a few translations and a small supplement.
Example
Copy Code code as follows:
Characteristics of this plugin:
. You can only enter numbers, decimal separators (including decimal points), minus sign.
supports different input formats for each text input on the same page, which means you can customize each
Currentstyle objects. Readable and writable for other objects. The corresponding script attribute is IMEMode.That's it. So when a text field does not require Chinese input, we can reduce the likelihood of errors by setting the Ime-mode property value to inactive or disabled. Similarly, we can set the Ime-mode property value of the text field that requires Chinese input to active.Usually the business system
Now there is a demand for the following figure:
Product manager said card number can only let input numbers (the middle of the space is the format of the added, but also with JS), sometimes my mind appeared a voice, what things, add a type=number not on the line, the fact that the pattern Tucson broken, not to say type= Number will be followed by a subscript (although using CSS to kill), but this type is to support the scientific
This article mainly introduces whether the PHP input is a pure digital, English, Chinese character method, involving PHP mb_strlen and strlen functions such as the use of skills, with a certain reference value, the need for friends can refer to the
-->
This article is an example of how PHP determines whether input is a pure digit, English, Chinese character. Sha
Original: WPF and Expression Blend development examples: A style-implemented digital input boxToday to a more kinky techniques, very few people use, but also do not recommend too frequent use.First-up style:Stylex:key= "Numbertextbox"TargetType="{x:type FrameworkElement}"> EventsetterEvent= "Previewtextinput"Handler= "Textbox_textinput"/> SetterValue= "False" Property= "inputmethod.isi
This article is also intended for asp tutorials. net is about asp.net tutorial c # and vb.net can only input English and digital functions, the first is c # limit can only input numbers and English, the last shows is vb.net, the principles are all one character, and then the internal code value is determined as follows.C #Private void textbox1_textchanged (object
Android:id= "@+id/edit_digit_input"Android:layout_width= "Wrap_content"android:layout_height= "Wrap_content"Android:digits= "1234567890."Android:singleline= "true"/>Android:id= "@+id/edit_digit_input"Android:layout_width= "Wrap_content"android:layout_height= "Wrap_content"Android:digits= "1234567890."Android:singleline= "true"/>Furthermore, the input type is set in the code:[Java] Edittext.setinputtype (editorinfo.type_class_phone);Edittext.setinputty
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.